import {
    NavBar, Form, Input, Button
} from 'antd-mobile';
import { useNavigate } from 'react-router-dom';
import '../assets/style/reg.scss';
export default function Reg() {
    const navigate = useNavigate();
    return (
        <div className='reg-container'>
            <NavBar className='page-header' onBack={() => navigate(-1)}>会员登录</NavBar>

            <div className="logo"></div>
            <Form
                onFinish={() => { }}
                footer={
                    <Button block type='submit' color='primary' size='large'>
                        立即注册
                    </Button>
                }
            >
                <Form.Item
                    name='phone'
                    rules={[{ required: true, message: '手机号不能为空' }]}
                >
                    <Input placeholder='请输入手机号' />
                </Form.Item>
                <Form.Item
                    name='nickname'
                    rules={[{ required: true, message: '昵称不能为空' }]}
                >
                    <Input placeholder='请输入昵称' />
                </Form.Item>
                <Form.Item name='password'
                    rules={[{ required: true, message: '密码不能为空' }]}
                >
                    <Input placeholder='请输入密码' />
                </Form.Item>
            </Form>
            <div style={{ padding: 10 }}>
                <Button onClick={()=>navigate('/login')} color="default" block size="middle">已有账号,直接登录</Button>
            </div>

        </div>
    )
}
